package 华为OD机试真题2023.基础题;

import java.io.File;
import java.io.FileNotFoundException;
import java.util.Arrays;
import java.util.Scanner;

public class HJ36_学校的位置 {
  public static void main(String[] args) throws FileNotFoundException {
    Scanner in = new Scanner(new File("src/main/java/华为OD机试真题2023/基础题/input/36.txt"));
    int N = in.nextInt();
    int[] list = new int[N];
    for (int i = 0; i < N; i++) {
      list[i] = in.nextInt();
    }
    Arrays.sort(list);
    if (N % 2 == 0) {
      System.out.println(list[N / 2 - 1]);
    } else {
      System.out.println(list[N / 2]);
    }
  }
}
